﻿@model Inscriptionem.ORM.Member

@{
    ViewBag.Title = Inscriptionem.Configuration.Configuration.Instance.General.Title + " » Пользователь";
    ViewBag.SearchText = "Поиск";
    Layout = "Layout.cshtml";
}
<div class="outer" id="contentwrap">
    <div class="sidecont">
		<div class="sidebar sidebar-left">
			<div class="sidebaradbox"></div>
		</div>
    </div>
    <div class="postcont" style="width: 772px;">
		<div id="content">	
			<div class="post type-post status-publish format-standard hentry">
                <h2 class="title">@(Model.MemberSettings.IsRealNameVisible ? (Model.FirstName + " " + Model.NickName + " " + Model.LastName) : Model.NickName)</h2>
                <div class="postdate-single error-message"></div>
				    <div class="entry">
                        @if (Model.ID == Inscriptionem.Authorization.Member.Current.ID)
                        {
                            <text>
                            <p><a href="/@Inscriptionem.Localization.Language.Current.Value/Member/Edit">Редактировать</a></p>
                            </text>
                        }
                        @if (Model.MemberSettings.IsBirthDateVisible)
                        { 
                            <text>
                            <p>Дата рождения: @(Model.BirthDate.HasValue ? Model.BirthDate.Value.ToShortDateString() : string.Empty)</p>
                            </text>
                        }
                        @if (Model.MemberSettings.IsMailVisible)
                        { 
                            <text>
                            <p>Имейл: @Model.Mail</p>
                            </text>
                        }

                        <p>Только чтение: <input type="checkbox" name="IsReadOnly" @(Model.IsReadOnly ? "checked" : string.Empty) disabled="disabled" /></p>
                        <p>Проверен: <input type="checkbox" name="IsRegistrationApproved" @(Model.IsRegistrationApproved ? "checked" : string.Empty) disabled="disabled" /></p>

                        <hr />
                        @if (!string.IsNullOrWhiteSpace(Model.MemberSettings.Description))
                        {
                            <text>
                            <p>Описание: @Model.MemberSettings.Description</p>
                            </text>
                        }

                        @if (!string.IsNullOrWhiteSpace(Model.MemberSettings.SiteLink) && Model.MemberSettings.SiteLink.ToLower().StartsWith("http"))
                        { 
                            <text>
                            <p><a href="@Model.MemberSettings.SiteLink">Сайт</a></p>
                            </text>
                        }
	                </div>
			</div>
		</div>
    </div>
</div>